The present invention relates generally to a system and method for capturing images with an electronic image capturing device, and more particularly to a video imaging system using a progressive-scan charge-coupled device (xe2x80x9cPSCCDxe2x80x9d), the system automatically adjusting the exposure time and illumination intensity as needed to obtain the correct contrast and brightness for the captured images.
Existing imaging systems used in machine vision applications do not automatically adjust to changes in lighting conditions when installed in the field. Therefore, with existing systems, a field application engineer must be sent to a system installation to adjust manually the system to account for changes in lighting conditions which would affect the ability of the imaging system to read an image. There is, therefore, a need for a robust imaging system which can adjust automatically to a varying illumination environment to provide a high quality image capture.
Another major problem encountered in performing machine vision work in general and, in particular, in the decoding of two dimensional matrix codes such as the DATA MATRIX codes of CiMatrix (formerly International Data Matrix), Canton, Mass., is achieving the correct contrast. Contrast is a function of many variables, including geometry and material properties. Primarily, though, it is a function of exposure time (shutter time), illumination intensity, and lens aperture (or f-stop). FIG. 1 illustrates the parameters of the prior art existing systems, which currently have to be manually adjusted. The existing systems effectively (1) set a shutter speed (switch on camera), (2) set the illumination intensity (most of the time by selecting a light type, sometimes by adjusting voltages), then (3) find an f-stop suitable to capture and process the image.
Furthermore, in existing video imaging systems, the image data is interlaced, meaning that the image is split into two alternating fields, each consisting of half of the video lines of information. The first field consists of the odd lines and the next field consists of the even lines. This is done to reduce the bandwidth of the signal for easier transmission and processing. One problem with interlacing is that if there is movement between the two fields, a blurry image results when the image is reassembled from the two fields. This presents a problem with bar code and machine vision applications particularly when the object being scanned is moving. One way to reduce the blur is to throw away one of the fields, but then half the vertical resolution is lost.
Another problem with interlacing is presented where an image is fast moving such that one would desire to capture the image rapidly. If using a strobe light to illuminate the image for rapid capture, the image is illuminated with a bright light for only a brief period of time such as, for example, 1 ms. With such a brief amount of illumination time, only one field of the interlaced image, which is obtained over a 30 ms period, will be illuminated.
Progressive scanning is superior to interlacing since a progressive-scan image consists of full frames of information; that is, all the lines are imaged and transmitted together. With progressive scan, all the data and resolution of an image is preserved.
It is therefore an object of this invention to provide a video imaging system wherein the contrast and brightness can be adjusted automatically.
It is a further object of this invention to provide a video imaging system which captures a full frame of information in a non-interlaced format with, for example, a progressive-scan charge-coupled device or a CMOS sensor.
It is a further object of this invention to provide a video imaging system outputting a digital video signal which can interface bidirectionally with external digital devices, such as an external display controller for displaying the digital signal or other external circuitry for updating programs and parameters.
It is a further object of this invention to provide a video imaging system which is asynchronous, allowing an image to be captured by the imaging system at any time, as soon as a command is received from an external application or device, without waiting for the imaging system to be synchronized with an external clock.
In accordance with one aspect of the present invention, a system for video imaging of an object is provided. In one preferred embodiment the system comprises an illumination source with an adjustable intensity a two-dimensional progressive scan CCD (PSCCD) sensor, having an optical input, a lens assembly positioned relative to the PSCCD sensor to image an object on the optical input, an A/D converter for converting an analog electrical signal from the CCD sensor into a digital data set corresponding to a video image of the object, a timing circuit having a time control signal coupled to the PSCCD sensor to control an exposure time during which the PSCCD sensor senses the optical input, and processing means operatively connected to the illumination source and the timing circuit for automatically adjusting the intensity of the illumination source and for controlling the timing circuit to adjust the effective shutter speed of the CCD in response to changing lighting conditions. In a preferred embodiment, the system is a camera.
In another embodiment of the invention, the A/D converter comprises a high and low reference input which are adjustable to adjust the contrast. In this embodiment, the system further comprises at least two D/A converters, including a first D/A converter connected from the processing means to the high reference input of the A/D converter to adjust the high reference level and a second DIA converter connected from the processing means to the low reference input of the A/D converter to adjust the low reference.
The system further comprises a digital interface over which the digital data set may be output to an external component. Another aspect of the invention concerns a method of capturing the video image of an object. One such method comprises illuminating the object with an illumination source, obtaining an optical image of the illuminated object, providing a sensor having an exposure time to sense an image and an analog output, controlling the exposure time during which the sensor senses the optical image, thereby producing an effective shutter speed, converting the optical image using the sensor into an analog electrical signal, converting the analog electrical signal into a digital video data set corresponding to a video image of the object, determining a histogram and a cumulative distribution function of brightness levels of the digital video image signal, determining a change in lighting conditions in response to the digital video image signal and automatically adjusting the intensity of the illumination source and the effective shutter speed, in response to a determined changed lighting conditions as a function of the histogram and cumulative distribution function.
Where the object read comprises an optically readable code, two brightness levels, corresponding to a light level and a dark level, are predominant. In this situation, the step of automatically adjusting the effective shutter speed preferrably also comprises determining the two predominant brightness levels from the histogram to determine the actual contrast of the optical image, determining a desired contrast of the optical image, determining whether an adjustment to the contrast is required based on the histogram for each of the two brightness levels, and, if necessary, adjusting the contrast by changing the effective shutter speed.
In a preferred embodiment the automatic adjustment of the intensity of the illumination source comprises determining an optimal value of the cumulative distribution function, comparing the optimal value of the cumulative distribution function to an actual value of the cumulative distribution function and adjusting the intensity of the illumination source until the actual value of the cumulative distribution function is the same as the optimal value of the cumulative distribution function.